import torch
from elegantrl.train.run import train_and_evaluate
from elegantrl.train.config import Arguments
import gym
from elegantrl.agents.AgentDoubleDQN import AgentD3QN

env_func = gym.make
env_args = {
    "env_num": 1,
    "env_name": "LunarLander-v2",
    "max_step": 1000,
    "state_dim": 8,
    "action_dim": 4,
    "if_discrete": True,
    "target_return": 200,
}
args = Arguments(AgentD3QN, env_func=env_func, env_args=env_args)
args.reward_scale = 2 ** -2
args.target_step = args.max_step
args.gamma = 0.99
args.eval_times = 2**5
args.random_seed = 2022
args.learner_gpus = 0

train_and_evaluate(args)

